package test;

import factory.AbstractFactory;
import factory.MysqlDaoFactory;
import factory.NewsDao;
import factory.NewsServiceImpl;

public class Demo3 {
    public static void main(String[] args) {
        AbstractFactory factory = new MysqlDaoFactory();
        NewsDao dao = factory.getInstance();
        NewsServiceImpl service = new NewsServiceImpl();
        service.setDao(dao);
    }
}
